package com.smartprofessor.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * qus_collect
 * @author 
 */
@Data
public class QusCollect implements Serializable {
    private Integer id;

    private String content;

    private Integer userId;

    private LocalDateTime askTime;

    private Boolean isAnswer;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        QusCollect other = (QusCollect) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getAskTime() == null ? other.getAskTime() == null : this.getAskTime().equals(other.getAskTime()))
            && (this.getIsAnswer() == null ? other.getIsAnswer() == null : this.getIsAnswer().equals(other.getIsAnswer()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getAskTime() == null) ? 0 : getAskTime().hashCode());
        result = prime * result + ((getIsAnswer() == null) ? 0 : getIsAnswer().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", content=").append(content);
        sb.append(", userId=").append(userId);
        sb.append(", askTime=").append(askTime);
        sb.append(", isAnswer=").append(isAnswer);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}